package com.ruoyi.system.service.req;

import com.ruoyi.common.core.domain.entity.RestaurantGoods;
import lombok.Builder;
import lombok.Data;

import java.util.List;

/**
 * @author：liyouxin
 * @date：2023/8/15 21:54
 */
@Data
@Builder
public class CreateGoodsDTO {
	private Long date;
	private Integer type;
	private String name;
	private String location;
	private List<CreateGoodsDetailDTO> goodsDetail;

	public static RestaurantGoods convertToDO(CreateGoodsDTO createGoodsDTO) {
		return RestaurantGoods.builder()
			.name(createGoodsDTO.getName())
			.location(createGoodsDTO.getLocation())
			.build();
	}
}
